import request from '@/utils/request'
// 获取图片地址
export const uploadImage = data => {
  return request({
    method: 'POST',
    url: '/mp/v1_0/user/images',
    data
  })
}
// 获取素材列表
export const getImages = params => {
  return request({
    method: 'GET',
    url: '/mp/v1_0/user/images',
    params
  })
}
// 设置收藏
export const setImage = (articleId, isCol) => {
  return request({
    method: 'PUT',
    url: `/mp/v1_0//user/images/${articleId}`,
    data: {
      collect: isCol
    }
  })
}
// 删除图片
export const delImage = (articleId) => {
  return request({
    method: 'DELETE',
    url: `/mp/v1_0//user/images/${articleId}`
  })
}
